package com.qjc.demo.thread;

import java.util.concurrent.locks.ReentrantLock;

/**
 * @Description:
 * @Author: qjc
 * @Date: 2020/8/12
 */
public class ReentrantLockTest {

    public static void main(String[] args) {
        //有公平锁和非公平锁，底层用的是CAS
        ReentrantLock reentrantLock = new ReentrantLock();
        reentrantLock.lock();
        reentrantLock.unlock();
    }

}
